// map.h
// 03 October 2011
// Purpose: Header for Map class



#ifndef MAP_H
#define MAP_H

#include "mapGen.h"

#include <ostream>
using std::ostream;

class Map
{
public:
	Map();						// Default Constructor,creates a blank map of 32 by 32
	Map(const int &,const int *,const Coordinate &,const Coordinate &);					// Takes size x, size y, and 1D int array and constructs map.
	Map(const Map &);//copy constructor for map of the same class.
	Map(const MapGen &);//copy constructor that takes a mapGen object.

	const Coordinate & getStart() const;//returns starting position of map

	const Coordinate & getFinish() const ;//returns finish postition of map

	void displayMap(ostream &) const;		// Prints map to a passed ostream

	int getH() const;//returns height of map
	int getW() const;//returns width of map

	void mapImport(const int &,const int *);//takes a size and 1-d array

	int * getMap() const;//returns a copy of _map

private:
	struct Coordinate _start;//starting position of map
	struct Coordinate _finish;//finish position of map
	int * _map;//1-D array
	int _h;//height of maze
	int _w;//width of maze

	void findW();//finds the width of the maze and sets _w to it
};
#endif // MAP_H